package com.dayu.sale.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.dayu.common.annotation.Excel;
import com.dayu.common.core.domain.BaseEntity;

import javax.validation.constraints.NotNull;

/**
 * 版本3 --- 退单信息对象 dy_refund_info
 *
 * @author HK
 * @date 2024-01-10
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class DyRefundInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 出售商品id */
    @NotNull(message = "商品id不能为空")
    private Long saleGoodsId;

    /** 商品id */
    @Excel(name = "商品编码")
    private String goodsId;

    /** 商品名称 */
    @Excel(name = "商品名称")
    private String goodsName;

    @Excel(name = "销售人")
    private String saleName;

    /** 账单id */
    private Long billId;

    /** 销售金额 */
    @Excel(name = "销售金额")
    private BigDecimal salePrice;

    /** 退回金额 */
    @Excel(name = "退回金额")
    @NotNull(message = "金额不能为空")
    private BigDecimal refundPrice;

    /** 收款方式 */
    @Excel(name = "付款方式",readConverterExp = "alipay=支付宝,wechat=微信,cash=现金,bank=银行卡,other=其它")
    private String payMethod;

    /** 收款账户 */
    @Excel(name = "付款账户",dictType = "recovery_bill_payee")
    private String payAccount;

    /** 利润 */
    @Excel(name = "利润")
    private BigDecimal profitPrice;

    /** 状态（1=待审核，2=通过，3=作废） */
    @Excel(name = "状态", readConverterExp = "1=待审核,2=通过,3=作废")
    private Integer status;

    /** 审核人id */
    private Long checkUserId;

    /** 审核人名称 */
    @Excel(name = "审核人名称")
    private String checkUserName;

    /** 审核时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date checkTime;

    /*审核备注*/
    @Excel(name = "审核备注")
    private String checkRemark;
}
